<!--
 - Simple friendly URL Tools v1.0
 - Write by icyleaf.
 - Time: 07/25/2008
 - URI: http://www.icyleaf.cn
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Simple friendly URL Tools</title>
<style type="text/css">
body{
    background: #BABABA url();
    font-size:0.9em;
    color: #595959;
    text-align: center;
}

a{color: #679C2F;}
a:hover{color: #994C4A}

hr{border:1px solid #A3A2A2}

#warp{
    margin: 0 auto;
    padding: 0;
    width: 620px;
    text-align: left;
}
#box{
    background: #E1E1E1;
    border: 1px solid #A3A2A2;
}

#box h1{
    background: #929292;
    font-size: 1.8em;
    color:#F5F5F5;
    margin: 0;
    padding: 0 0 0 5px;
}

div.list{padding: 10px 5px}

#string, #base64encode{width:600px}

.red{color: red}
.bold{font-weight: bold}
</style>
</head>
<body>
<div id="warp">
    <div id="box">
        <h1>Simple friendly URL Tools</h1>
        <div class="list">
            <form action="<?php echo $_SERVICE['POST'] ?>" method="post">
                尝试着输入各国语言的一些文字： | <a href="example.php">演示</a><br />
                <input id="string" type="text" name="string" size="100" /><br />
                <input type="submit" name="submit" value="转换" />
            </form>

            <?php
            require_once("friendlyurl.php");
            if(isset($_POST['string'])){
                if($_POST['string']!=""){
                $string = $_POST['string'];
                    echo "<hr>转换过程: 原文字 -> 英文 -> SEO FriendlyURL<br />";
                    echo '<textarea id="base64encode" rows="5" cols="100">'.
                        $string.
                        "\n".translate($string).
                        "\n".friendlyURL(translate($string)).
                        '</textarea></span><br />';
                }else{
                    echo "<hr><span class=\"red bold\">Something is wrong, please check and try again.</span><br />";
                }
            }
            ?>
            <div style="float:right">Made by <a href="http://www.icyleaf.cn/">icyleaf</a></div>
            <a href="http://www.icyleaf.cn/2008/07/24/seo-friendly-url-in-php" target="_blank">如何使用PHP代码SEO你的URL?</a>
        </div>
    </div>
</div>
</body>
</html>
